here I have a simple script that will create visitors log and show how many visitors are online past 5 minutes

======================================================

<?PHP
$file = "users.ini";
$ip = $_SERVER['REMOTE_ADDR'];
$time = time();
$content = @file_get_contents($file);
$new_content = $ip." = ".$time;
$content .= $new_content."\r\n";
@file_put_contents($file,$content);

$users = @parse_ini_file($file);
$count = 0;
foreach($users as $ip=>$time){
	if($time >= time() - 500){
		$count++;
	}
}
echo "We have <b>$count</b> visitors now";
?>